package com.czn.shopdemo.model;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author Zenan Chen
 * @date 2023/4/4 14:40
 */
@Data
@TableName(value = "t_shop_demo_cart")
@EqualsAndHashCode(callSuper = false)
public class Cart extends BaseEntity {

    @ApiModelProperty(value = "用户id", example = "5",hidden = true)
    @TableField("user_id")
    private String userId;

    @ApiModelProperty(value = "商户id", example = "0519505be0fa42d7842dc1a61f41563e")
    @TableField("business_id")
    private String businessId;

    @ApiModelProperty(value = "商品id", example = "19ab1ba6c89c4b1b853a340033e569d2")
    @TableField("goods_id")
    private String goodsId;

    @ApiModelProperty(value = "商品数量", example = "2")
    @TableField("count")
    private Integer count;

    @ApiModelProperty(value = "逻辑删除(1:已删除，0:未删除)", hidden = true)
    @TableField("is_deleted")
    private Integer isDeleted;

    //屏蔽book属性和数据库表中字段映射
    @ApiModelProperty(value = "商品信息", hidden = true)
    @TableField(exist = false)
    private Goods goods;
}
